package by.pavlyukevich.paymentsystem.datamodel.payment;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;

import by.pavlyukevich.paymentsystem.datamodel.AbstractEntity;

@Entity
public class CalcScheme extends AbstractEntity<Integer> {

	@ManyToOne(fetch = FetchType.LAZY, cascade = { CascadeType.REFRESH })
	private PaymentType paymentType;

	@ManyToOne(fetch = FetchType.LAZY)
	private Period period;

	@Column
	private Double consumption;

	@Column
	private Double price;

	public PaymentType getPaymentType() {
		return paymentType;
	}

	public void setPaymentType(PaymentType paymentType) {
		this.paymentType = paymentType;
	}

	public Period getPeriod() {
		return period;
	}

	public void setPeriod(Period period) {
		this.period = period;
	}

	public Double getConsumption() {
		return consumption;
	}

	public void setConsumption(Double consumption) {
		this.consumption = consumption;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

}
